#ifndef __MODEL_POINT_TABLE_H__
#define __MODEL_POINT_TABLE_H__
#include <stdint.h>
#include "dbStatement.h"
/**
 * @brief 测点模型
 */
typedef struct _MODEL_POINT{
    int64_t  id;          //测点ID
    int64_t  modelID;     //模型ID
    char name[32];        //模型名称
    int  dataType;        //数据类型
    uint8_t classify;     //1-遥测 2-遥信 3-遥控 4-遥调
    struct _MODEL_POINT* next;
    struct _MODEL_POINT* prev;
}T_MODEL_POINT;

/**
 * @brief 测点模型
 */
typedef struct _MODEL_POINT_LIST{
    int  count;
    T_MODEL_POINT* tail;
    T_MODEL_POINT* head;
}T_MODEL_POINT_LIST;


extern int  createModelPointTable();
extern int  insertModelPoint(T_MODEL_POINT* modelPoint);
extern int  replaceModelPoint(T_MODEL_POINT* modelPoint);
extern int  deleteModelPoint(T_MODEL_POINT* modelPoint);
extern int  selectModelPoint(const char* sql, T_MODEL_POINT_LIST* modelPointList);


#endif /* __MODEL_POINT_TABLE_H__ */